			<div class="bottom_4">
				<div class="info">
					<div class="sales">
						<div class="tab" id="tab">
							<div style="z-index:999; text-align:center;"><img src="<?php echo $rooturl; ?>imgs/loading.gif" height="224" /></div>
                            <?
								$sanpham_km = $t->get_by_thutu("sanpham",-1,1," AND gia_km>0 AND gia_km<gia GROUP BY idloai"," LIMIT 0,5");
								$i=0;
								while($row_spkm=mysql_fetch_assoc($sanpham_km)){
									$idloai=$row_spkm['idloai'];
									$loai=$t->get_by_thutu("sanpham_loai",$idloai);
									$row_loai=mysql_fetch_assoc($loai);
									if($row_loai['ten_'.$lang]=='') $row_loai['ten_'.$lang]='-';
							?>
							<label> <a href="javascript:;" onclick="change_tab(<?=$i?>);" ><?=$row_loai['ten_'.$lang]?></a>
								<div>
									<ul>
                                    	<?
											$i++;
											$sanpham = $t->get_by_thutu("sanpham",-1,1," AND gia_km>0 AND gia_km<gia AND idloai='".$row_spkm['idloai']."'"," LIMIT 0,5");
											while($row_sp=mysql_fetch_assoc($sanpham)){
										
												$idchungloai=$row_sp['idcl'];
												$chungloai=$t->get_by_thutu("sanpham_chungloai",$idchungloai);
												$row_chungloai=mysql_fetch_assoc($chungloai);
												if($row_chungloai['ten_'.$lang]=='') $row_chungloai['ten_'.$lang]='-';
												
												$idroot=$row_sp['idroot'];
												$root=$t->get_by_thutu("sanpham_root",$idroot);
												$row_root=mysql_fetch_assoc($root);
												if($row_root['ten_'.$lang]=='') $row_root['ten_'.$lang]='-';
												
												$idmenu=$row_sp['idmenu'];
												$menu=$t->get_by_thutu("sanpham_menu",$idmenu);
												$row_menu=mysql_fetch_assoc($menu);
												if($row_menu['ten_'.$lang]=='') $row_menu['ten_'.$lang]='-';
												$images = explode(':*:',$row_sp['url_img']);
												
										?>
										<li class="top">
											<a title="<?=$row_sp['ten_'.$lang]  ?>" href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
												<img src="<?=getUrlThumbnail($images[0])?>" />
											</a>
											<br/>
											<a href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
												<?=$row_sp['code']?>
											</a>
											<br/>
											<span class="price1"><?=number_format($row_sp['gia'],0,".",",")?></span>
											<br/>
											<span class="price2"><?=number_format($row_sp['gia_km'],0,".",",")?></span>
										</li>
										<?
											}
										?>
									</ul>
								</div> 
                            </label>
                            <?
								}
							?>
						</div>
						<script>
							change_tab(0);
						</script>
					</div>
				</div>
			</div>